Skip to content

Comments

added files for 5 lab#5

Open
Maria-Sparrow wants to merge 3 commits intomainfrom
lab-5
Open

added files for 5 lab#5
Maria-Sparrow wants to merge 3 commits intomainfrom
lab-5

Conversation

@Maria-Sparrow
Copy link
Owner

No description provided.

if string is not None and substring is not None and len(string) >= len(substring) and len(substring) != 0:
for element in range(len(string) - len(substring) + 1):
for sub_element in range(len(substring)):
if not string[element + sub_element] == substring[sub_element]:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use inverted logic here in order to avoid 'else' statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants